package cn.qq.xiangmu.entity;

import java.sql.SQLOutput;

public  final class Penguin extends Pet {
    public String sex;

    public Penguin() {
    }

    public Penguin(String name, int health, int love, String sex) {
        super(name, health, love);
        this.sex = sex;
    }
    public String getStrain() {
        return sex;
    }

    public void setStrain(String strain) {
        this.sex = sex;
    }

    @Override
    public void print() {
        super.print();
        System.out.println(",性别是"+sex);
    }

    @Override
    public void f1() {

    }

    @Override
    public void eat() {
        System.out.println("吃鱼");
        this.setHealth(this.getHealth()+5);
    }
    public void swimming(){
        System.out.println("游泳");
        this.setHealth(this.getHealth()-5);
        super.setLove(super.getLove()+3);

    }
}




